import time
from gevent import monkey, spawn

monkey.patch_all()


def da():
    for _ in range(5):
        print("哒")
        time.sleep(2)


def mie():
    for _ in range(5):
        print("咩")
        time.sleep(2)


start = time.time()
g1 = spawn(da)
g2 = spawn(mie)

g1.start()
g2.start()

g1.join()
g2.join()

end = time.time()

print(end - start)
